<?php
/**
 * 类调用方法
 * 使用方法示例
 * $name为类存放文件名，不带扩展后缀名称
 * $democreateclass = c_create::createClass('democreateclass');
**/
class c_create
{
	/**
	 * 功能：建类
	 * 参数：$name为类存放文件名，不带扩展后缀名称； $var 析构函数参数（数组形式）最多9个参数;
	 * $democreateclass = c_create::createClass('democreateclass');
	**/

	function createClass($name){
		include_once(SITE_ROOT."module/API/$name.php");
		/*
		if (is_array($var))
		switch (count($var)){
			case 9:
				return new $name($var[0],$var[1],$var[2],$var[3],$var[4],$var[5],$var[6],$var[7],$var[8]);
				break;
			case 8:
				return new $name($var[0],$var[1],$var[2],$var[3],$var[4],$var[5],$var[6],$var[7]);
				break;
			case 7:
				return new $name($var[0],$var[1],$var[2],$var[3],$var[4],$var[5],$var[6]);
				break;
			case 6:
				return new $name($var[0],$var[1],$var[2],$var[3],$var[4],$var[5]);
				break;
			case 5:
				return new $name($var[0],$var[1],$var[2],$var[3],$var[4]);
				break;
			case 4:
				return new $name($var[0],$var[1],$var[2],$var[3]);
				break;
			case 3:
				return new $name($var[0],$var[1],$var[2]);
				break;
			case 2:
				return new $name($var[0],$var[1]);
				break;
			case 1:
				return new $name($var[0]);
				break;
			default:
				return new $name();
				break;
		}else {
			return new $name();
		}
		*/
	}
}
?>